package com.cnswhy.cloud.server.core.dao;

import com.cnswhy.cloud.common.core.base.mapper.SuperMapper;
import com.cnswhy.cloud.server.core.entity.BuyBackOrder;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;

/**
 * <p>
 * Mapper 接口
 * 
 * </p>
 *
 * @author cnswhy
 * @date 2020-10-17
 */
@Repository
public interface BuyBackOrderMapper extends SuperMapper<BuyBackOrder> {
    @Select("select ifnull(sum(t.order_price),0) from t_buy_back_order t where t.sett_date = #{settDate} and t.back_type = #{backType}")
    BigDecimal getSumAmountBySettDate(@Param("settDate") String settDate, @Param("backType") int backType);
}
